import {customeStruct} from '../utils';
const itf = customeStruct.interface;
export const List = itf({
    payload: itf({
        content: [itf({
            id: 'string',
            rowVersion: 'string? | null',
            options: ['string']
        })],
        totalElements: 'number'
    })
});


export const Detail = itf({
    payload: itf(
        {
            id: 'string',
            rowVersion: 'string? | null',
            options: [
                'string'
            ],
            packingLists: [itf({
                id: 'string',
            })],
            details: [itf({
                packingListId: 'string',
            })],
        },
    )
});

export const Dealer = itf({
    payload: itf({
        content: [
            itf({
                id: 'string',
                code: 'string',
                name: 'string',
            })
        ],
        totalElements: 'number? | null'
    })
});

export const Brand = itf({
    payload: itf({
        content: [
            itf({
                id: 'string',
                code: 'string',
                name: 'string',
            })
        ],
    })
});

export const Payment = itf({
    payload: itf(
        {
            paymentType: 'number? | null',
        },
    )
});

export const RebateFee = itf({
    payload: itf(
        {
            rebateFee: 'number? | null',
        },
    )
});

export const LockedFee = itf({
    payload: itf(
        {
            lockedFee: 'number? | null',
        },
    )
});

export const PrevList = itf({
    payload: itf(
        {
            buyer: 'string? | null',
            buyerAddress: 'string? | null',
            buyerNumber: 'string? | null',
            buyerFAX: 'string? | null',
            buyerCantact: 'string? | null',
            origin: 'string? | null',
            destination: 'string? | null'
        },
    )
});

export const PackingList = itf({
    payload: itf({
        content: [itf({
            id: 'string',
        })],
        totalElements: 'number'
    })
});

export const HistoryList = itf({
    payload: itf({
        content: [itf({
            id: 'string',
            rowVersion: 'string? | null',
        })],
        totalElements: 'number'
    })
});

export const HistoryDetail = itf({
    payload: itf(
        {
            id: 'string',
        })
});
